import Vue from "vue";
import Vuex from "vuex";
import getters from "./getters";
import app from "./modules/app";
import settings from "./modules/settings";
import * as actions from "./actions";
import mutations from "./mutations";
import state from "./state";

import dictionary from "./modules/dictionary";

// import createPersistedState from "vuex-persistedstate";

Vue.use(Vuex);

const store = new Vuex.Store({
  modules: {
    app,
    settings,
    dictionary,
  },
  actions,
  getters,
  mutations,
  state,
  //权限信息存到了vuex中，为保证刷新页面vuex不丢失，加了vuex-persistedsta这个插件
  // plugins:[createPersistedState()]
});

export default store;
